/**
 *Copyright (c) 2024 watereyes
 * safetymanagement is licensed under Mulan PubL v2.
 * You can use this software according to the terms and conditions of the Mulan
 * PubL v2.
 * You may obtain a copy of Mulan PubL v2 at:
 *          http://license.coscl.org.cn/MulanPubL-2.0
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND,
 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT,
 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 * See the Mulan PubL v2 for more details.
 */
package com.koron.system.service.api;


import com.koron.common.domain.DataBean;
import com.koron.system.domain.DictData;
import org.swan.bean.MessageBean;

import java.util.List;
import java.util.Map;

public interface DictDataService {
    /**
     * 保存字典数据
     * @param dictData
     * @return
     */
    MessageBean<Integer> save(DictData dictData);

    /**
     * 批量修改字典数据
     * @param dictDataList
     * @return
     */
    MessageBean<Integer> batchUpdate(List<DictData> dictDataList);

    /**
     * 批量删除字典数据
     * @param idList
     * @return
     */
    MessageBean<Integer> batchDelete(List<String> idList);

    /**
     * 根据主键查询字典数据
     * @param id
     * @return
     */
    MessageBean<DictData> queryOne(String id);

    /**
     * 查询字典数据列表信息
     * @return
     */
    MessageBean<DataBean<DictData>> queryAll(String dictLabel,String dictKey,Integer start,Integer rows);

    /**
     * 根据字典类型名称和字典数据标签查询字典数据详情
     * @param dictTypeName
     * @param dictLabel
     * @return
     */
    DictData matchDictData(String dictTypeName,String dictLabel);


    /**
     * 缓存的字典项
     * @return
     */
    Map<String, DictData> getCacheMap();

}
